package org.infodavid.common.ejb.components;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.Lob;

import org.infodavid.common.impl.model.ImageDataImpl;

/**
 * The Class ImageDataComponent.
 */
@Embeddable
public class ImageDataComponent extends ImageDataImpl {

	/** serialVersionUID. */
	private static final long serialVersionUID = -7948981883198179487L;

	/**
	 * The Constructor.
	 * @throws Exception the exception
	 */
	protected ImageDataComponent() throws Exception {
		super();
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.impl.model.ImageDataImpl#getType()
	 */
	@Override
	@Enumerated(EnumType.STRING)
	@Column(name = TYPE, nullable = true, length = 16)
	public EImageType getType() {
		return super.getType();
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.impl.model.ImageDataImpl#getValue()
	 */
	@Override
	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "data", nullable = true, length = 102400)
	public byte[] getValue() {
		return super.getValue();
	}
}
